Repository navigation
feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list - #37226
Conversation
…it state A Studio list's dashboard or report opens its app's page with the edit state (or the report builder) on arrival, in the app decision 6 picks; the address carries ?studio= so the page's x returns to the list. The report list's New opens /apps/APP/reports/new. No app: the generic detail, as before. The dashboard edit is not offered below sm. Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
…ne gate; changeset and docs Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
…cross-package leg itself Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYmSqW1KzbiTWCnSN1K Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
…age; a draft-only item keeps Studio's page The new-report page opened from Studio's report list saves into the app's package (its pair on a read-only base), as a new view made in an app is. A dashboard or report with no published version keeps the generic item page; a create in a package's area replaces its own history entry. The report builder's x and the new-report page's x ask over unsaved edits outside Studio too. Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…e read-only base and the x asks Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…name the draft-only and save-placement rules Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…ge test Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit Claude-Session: https://claude.ai/code/session_01QSeKYokyE3hgberJHmAFME Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
…shboard-report-app-edit
…says so; pin the create landing's replace at the real page; the new-report save cases wait on what they assert Claude-Session: https://claude.ai/code/session_01QSeKYofoAyhBfKixcEM6wT Co-authored-by: Claude <noreply@anthropic.com>
…notice pin reads its key Claude-Session: https://claude.ai/code/session_01QSeKYofoAyhBfKixcEM6wT Co-authored-by: Claude <noreply@anthropic.com>
…shboard-report-app-edit
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H Landing · 2026-11-25T12:04Z · head
|
Fixes #36906
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Epic #36890, decisions 3, 6, 13 and 15.
studioBackTarget), so the two cannot disagree. It lives in a new pure module,studioAppEdit.ts, and the area's step isStudioAreaAppOpen.tsx.?studio=with the Studio list it came from, filters and sort included. It is built and read only throughstudioAddress.ts(withStudioReturn,readStudioReturn) and registered as a reserved console param. The value is read as untrusted: only a Studio address on this origin is followed. While the param is present, the dashboard page and the report page draw a × that returns to that list, after a reload too. The report builder's own × does the same. Leaving unsaved edits asks first./apps/APP/reports/newin the app picked the same way. Its × goes back to the list, and the saved report's page keeps the way back. With no app, the area creates as before. Dashboard New is Studio 重构(3-4b):仪表盘列表的「新建」跳到应用的设计模式并直接打开「添加菜单项 → 仪表盘」(设计模式加一个到达入口) #36907's, untouched.resolveRuntimeCreatePackage): the package when it is writable, else its.custompair through the ensure door; when neither can be had, naming no package, as views fall back, and then an info notice says the report was saved outside the app's package, so the Studio list does not show it (report.builder.savedOutsideApp, the counterpart of a view'sonSavedOutsideAppnotice). The draft, the publish and the discard of a refused publish all name that package (saveAndPublishInPackage), so on every other leg the report is in the list × returns to. The console warningresolveRuntimeCreatePackageprints on that fallback now names the type it saves (it said "the view" for a report too): the function takes the type as its second argument. On a read-only base whose pair door is closed (walled, or a kernel package), report New no longer opens the app page: it goes back to the list, as every create there does.StudioAreaAppOpenreads the item once, as the app reads it (published, no draft preview,?package=the open package). No published version (a draft only: an AI draft, a create whose publish was refused), or a failed read, keeps Studio's generic item page, which is the page that opens the draft. Only then are the package's apps read.studioCreateLandsInApp, read byResourceEditPage), so Back from the app lands on the list. Every other type, and Setup, land as before.dirtyfor the Studio leg; the ask now runs before either leg.useDashboardEditOfferednow also requires a window at leastsm(640 px) wide, the width from which the edit state's side panel is drawn. Before, only the button's CSS hid it. A landing that asks for the edit state on a narrower window is cleared and opens nothing, so neither Studio nor the design mode can put a phone into the edit state.studioReturnstrings, andreport.builder.savedOutsideApp, in every bundled locale (additive only; no released key removed). zh-Hant is regenerated from zh-Hans by its generator.Why
The maintainer asked that dashboards and reports listed in Studio open straight into the front end's design page (epic #36890). The epic's decisions fix which app, the fallback, the report New target and the address-borne way back.
Tests
studioAppEdit.test.ts: decision 6, rule by rule; the new-report variant; agreement with the back link; the app addresses.studioAddress.test.ts, new top-level describe: the?studio=builder and reader, the refusals both ways (another origin, protocol-relative,/studiox, a backslash,javascript:), and the reserved-param registry.StudioAreaAppOpen-36906.test.tsx, through the realStudioMetadataArearoutes: the app picked, the arrival carried, the return address (list context kept, item-only params dropped), the replace, and every open that keeps the item page (a tab, the review, no app, the cross-package leg, other types). Also report New, and its fallback.DashboardView.inPageEdit-36372.test.tsx, new describe: landing from Studio, × target, × after a reload, the dirty prompt, the phone landing (cleared, no edit, no Edit button), and an off-Studio value drawing no ×.ReportView.designModeExclusion-36692.test.tsx, new describe: landing in the builder, the builder × to Studio, its dirty prompt, the page × beside Edit, and the card's check: reached with the design mode already on, no builder and no Edit, while × still goes back.ReportNewPage-36692.test.tsx, new describe: × to Studio, and Save keeping?studio=. This round: Save from Studio namespackageId: Pon the draft and the publish; on a read-only base it names the pair (P.custom, asked of the ensure door); CONTROL: a refusing ensure door falls back to the package-less save. × over an edit asks; declining stays with nothing sent; agreeing goes back to the Studio list (and the clean × asks nothing). Outside Studio: Save names no package and asks no package door, and × over an edit asks.StudioAreaAppOpen-36906.test.tsx, previous round: a draft-only dashboard row keeps the item page and reads no app; so does a draft-only report and a failed read;studioCreateLandsInApprule by rule. Its "dashboard create → Save lands on the app's dashboard and Back lands on the list" case drives the area's routes over a create STUB (CreateStubreimplements the landing), so it pins the gate's forward and Back over a replaced entry, notResourceEditPage's call site; that is pinned in the new file below. A read-only base (readOnly,customizationhanded in): its dashboard row opens in the base's app; a pair-row address (/studio/BASE.custom/metadata/dashboard/X?package=BASE.custom) keeps the generic page (the starting point of Studio:以 .custom 配对包打开时,仪表盘和报表经基础包的应用打开(而不是留在通用条目页) #37237); report New opens the base app's new-report page; with the pair door walled, or no customization, report New goes back to the list.ReportView.designModeExclusion-36692.test.tsx, previous round: outside Studio, a clean builder × closes without asking; over an edit it asks, declining keeps the builder, agreeing closes it.ResourceEditPage.createLandingReplace-36906.test.tsx(this round), the REALMetadataResourceEditPageover a realMetadataClientand an in-memory server: under aMetadataAreaHostwith apackageId, a dashboard create's Save lands on the item with a REPLACE (useNavigationType); CONTROLs: aviewcreate in the same area, and a dashboard create with no area host (Setup), land with a PUSH. Each case also pins the save's?package=(the area's package, or none).ReportNewPage-36692.test.tsx, this round: the refusing-door CONTROL now also asserts the info notice (once, thereport.builder.savedOutsideAppkey) and that the console warning names the report; the package, pair and outside-Studio cases assert no notice. The clock is gone from the save cases: the Han romanizerhandleSaveawaits is paid once in abeforeAll(a cold dynamic import, paid at collection), and every save case waits on the address it asserts (waitFor) instead of twosetTimeout(0)ticks, so a late save can no longer land in the next case.useDashboardEditOffered, the phone pin fails 1/1. Restored, its blob equals HEAD's andgit diff HEADis empty.scripts/ablation-replace.mjs(anchor 1 to 0, restore proven blob == HEAD andgit diff HEADempty), are listed under Verification.Acceptance notes
ReportNewPage.tsx(fires only when Studio opened the page, the app has a package, and none could be had), and the new real-page pinResourceEditPage.createLandingReplace-36906.test.tsx.ReportNewPage.tsx(where a report made from Studio is written: the package, its pair, or none), the published-version read at the top ofStudioAreaAppOpen.tsx's effect, and thereplaceon the create landing inResourceEditPage.tsx(shared by every type; it readsstudioCreateLandsInApp, true only for a dashboard or report in a package's area).StudioAreaAppOpen.tsx(async app pick and replace; the fallback), theuseDashboardEditOfferedand arrival hunks inDashboardInPageEditor.tsxandDashboardView.tsx(the phone gate now also governs the design mode's landing), and the?studio=reader instudioAddress.ts(an address-bar value followed by a navigate).StudioMetadataArea.tsxis kept narrow: one import, the item open wrapped inStudioAreaAppGate, and the create split. Open PRs feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089, feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168 and feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169 edit the same file in other hunks.overlap-checkmerges cleanly with all three at this head. Whichever lands later merges main.runtime-metadata-persistence.tschanges in one place this round:resolveRuntimeCreatePackage(appPackageId, type, doors?)takes the type it resolves for, only so its fallback warning names it; its answer is unchanged, and its two internal callers pass the type they save (view). The new-report page now also calls two of its existing exports:resolveRuntimeCreatePackage(other callers:createRuntimeMetadataandsaveAndPublishRuntimeMetadatathemselves, for views only) andsaveAndPublishInPackage(other callers:saveInPlace, the in-page dashboard and report Save, andsetup/publicForms.ts).saveAndPublishRuntimeMetadata's other callers (objectViewViewSharing.ts,objectViewViewCrud.tsx,setup/publicForms.ts) andcreateRuntimeMetadata's (objectViewViewCrud.tsx,ObjectDataPage.tsx) are untouched.authoredBuffer); the builder's Save is then refused with 「This report has unpublished changes. Publish or discard them above, then save.」, and nothing is written over the draft (the first-write pin). Either way the draft stays Studio's to publish or discard. Read from the code at this head, not walked..custom) is pinned at unit level by the existing case "an installed package saves into its customization pair". It is NOT MEASURED live on HotCRM: no HotCRM checkout is in this session. That leg carries to Studio 重构(4-2):新形态的端到端测试、总走查,更新平台测试清单、文档和技能里的 Studio 地址与说法 #36910..custompair's dashboards and reports keep the generic item page (decision 6, rule 3); Studio:以 .custom 配对包打开时,仪表盘和报表经基础包的应用打开(而不是留在通用条目页) #37237 resolves them through the base package's apps.Verification
Two-minute check: open Studio for a writable package with a published app, go to Reports, press New, pick a data source and a measure, name it, and Save. Expected: the report's page in the app, with a 「Back to Studio」 ×; click it, and the new report is in the Studio list.
Rework 2's readings are at head
298361bd(this branch withorigin/main057cedfamerged in) unless a line names another head. The previous rounds' readings below keep their own heads (08107d2f,727300e5).Live walk-through, this round (per-agent stack; CRM example plus one writable package)
The stack is a fresh
examples/app-crmbackend (pnpm dev:crm -- --fresh) with the Console served by Vite from this branch'sui/source, driven by Playwright as the seeded admin, at727300e5. In this stack the CRM package is a read-only code package, so it walks the read-only base leg. A second package, created writable throughPOST /api/v1/packageswith one published app, walks the writable leg.Writable package (11 PASS, 0 FAIL):
PUT ?mode=draft), opened at its Studio row address, stays on Studio's generic item page./apps/PKG/dashboard/NAMEwith the way back to the dashboard list. The app page shows the just-published dashboard in its edit state (no 「not found」). Browser Back from there lands on the dashboard list, not on the create page.GET /api/v1/meta/report/NAME?package=PKGanswers 200 withpackageId: PKG. × returns to the report list, and the new report is in it.Read-only CRM package:
com.example.crm.custom(a read at?package=com.example.crmanswers 409 naming that pair as the holder). × returns to the CRM report list, and the new report is in it.HotCRM: NOT MEASURED, carried to #36910.
Tests, rework 2 (head `298361bd` unless named)
ReportNewPage-36692,ReportView.designModeExclusion-36692,StudioAreaAppOpen-36906,studioAppEdit,studioAddress,DashboardView.inPageEdit-36372) plus the newResourceEditPage.createLandingReplace-36906, default workers, 3 runs on this merged tree: each run lock VERDICT command-exit 0, Test Files 7 passed (7), Tests 95 passed (95). The six alone, 3 runs at35c94a71(merged withorigin/mainede9b91f): each 6 passed (6), 92 passed (92).ad67a645, before the fix, ran 92 of 92 green once. So the clock is shown another way: withloadHanRomanizerslowed by 100 ms (a mutation throughscripts/ablation-replace.mjs, restored blob == HEAD), the previous round's test file fails its two clock-bound save cases (plus its refusing-door CONTROL, which also lacks the newtoast.infomock), while this round's file passes 13 of 13.35c94a71, the wider set: everyResourceEditPage*,runtime-metadata-persistence*,Report*andDashboardView*test,urlParams.test.ts,views/studio-design/,views/studio-detail/andpackages/i18n/. Lock VERDICT command-exit 0, Test Files 505 passed (505), Tests 4838 passed, 13 skipped.pnpm --filter @object-ui/app-shell run type-check, both tsc programs, at35c94a71: lock VERDICT command-exit 0, 0error TS. (The final merge brings no app-shell or i18n file.)no-explicit-any,only-export-components).scripts/ablation-replace.mjsunder the lock (anchor 1 to 0, restore proven by blob == HEAD andgit diff HEADempty):8. The call site,
replace: studioCreateLandsInApp(areaHost?.packageId, type),toreplace: false,inResourceEditPage.tsx: the new dashboard REPLACE case fails (1 failed, 2 passed of 3); both CONTROLs stay green.9. The notice line removed from
ReportNewPage.tsx: the refusing-door CONTROL fails (1 failed, 12 passed of 13).Tests, previous rounds
08107d2f, the seven touched test files (ReportNewPage-36692,ReportView.designModeExclusion-36692,StudioAreaAppOpen-36906,studioAppEdit,studioAddress,DashboardView.inPageEdit-36372,urlParams): lock VERDICT command-exit 0, 7 files, 99 tests passed.727300e5, the wider set: everyDashboardView*andReport*test, everyResourceEditPage*test, everyruntime-metadata-persistence*test,views/studio-design/,views/studio-detail/,src/__tests__/,src/preview/,urlParams.test.tsandpackages/i18n/. Lock VERDICT command-exit 0, 585 of 585 files, 5,662 passed, 13 skipped.pnpm --filter @object-ui/app-shell run type-check, both programs, at08107d2f: exit 0, 0error TS.scripts/ablation-replace.mjsunder the lock (anchor 1 to 0; restore proven by blob == HEAD andgit diff HEADempty). ui tests resolvesrcdirectly, so nodistleg applies:dirty &&dropped (asks on a clean x): the two clean-x pins fail (2 of 13).null: the package pin, the pair pin and the refusing-door CONTROL fail (3 of 13). The CONTROL fails because no door is asked at all.StudioAreaAppOpen, the no-published-version fallback disabled: the two draft-only pins fail (2 of 16).studioCreateLandsInAppforced tofalse: the create-then-Back pin and the rule pin fail (2 of 16). Corrected in rework 2: this reaches the pure rule and the create stub's own copy of the landing inStudioAreaAppOpen-36906, notResourceEditPage's call site (the seat's call-site ablation left that file green, 16 of 16). Ablation 8 above reaches the call site.Local gates, rework 2 (`dispatch-gates.mjs --commands`, 73 families)
298361bd: all 74 derived families exit 0, each recorded ascmd :: exit Nand reconciled with--ran: "74 derived famil(ies) accounted for — 74 run, 0 NOT-MEASURED". The uiscripts/family ran under the lock with--maxWorkers=1: Test Files 172 passed, 2 skipped. (The same 72 non-ui families also ran at35c94a71, all exit 0 aftercheck:skill-examplesfirst refused with exit 3 because@objectstack/client-reactwas not built in this worktree, then exit 0 once built.)298361bd:check:test-source-aliasexit 0, uicheck:i18n-keysexit 0 (every call-site key resolves against the en pack),check:nul-bytesexit 0,check-platform-checklist --changed-from origin/mainexit 0 (0 anchored files), andoverlap-checkVERDICT clean exit 0 (origin/main057cedfa, fix(app-shell)!: Home no longer offers Build with AI or Build an app #37249, feat(ai): get_record_context joins the service-ai platform tool group, with its chat label (ADR-0160 row 9) #37210, feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169, feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166). The same alias and overlap checks also ran clean before the push.Local gates, previous round (`dispatch-gates.mjs --commands`, 73 families at that head)
08107d2f: all 73 derived families exit 0, each recorded ascmd :: exit Nand reconciled with--ran: "73 derived famil(ies) accounted for — 73 run, 0 NOT-MEASURED". Two needed a second run:check:skill-examplesfirst exited 3 (it refused, measuring nothing, becausepackages/client's source was newer than its build after a local history rebuild), then 0 after rebuildingclient; the uiscripts/family ran under the lock with--maxWorkers=1: 172 files passed, 2 skipped.check:test-source-aliasfirst exited 1 at727300e5: the new-report page now imports the draft bar's package rule, which reaches@objectstack/lint. The test file pays that load at collection (import '@objectstack/lint', the gate's prescription); exit 0 since, and at08107d2f.08107d2f:overlap-checkVERDICT clean (main, fix(app-shell)!: Home no longer offers Build with AI or Build an app #37249, feat(ai): get_record_context joins the service-ai platform tool group, with its chat label (ADR-0160 row 9) #37210, feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169, feat(studio): the object designer opens full-screen on its metadata address, tabs in #36513's order #37168, feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166),@objectstack/spec check:generatedexit 0 after the merge, andcheck-platform-checklist --changed-from origin/mainexit 0 (no anchored file changed).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (eslint on the changed files locally; the repo-wide run is CI's.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code